﻿using System.Web.UI;

namespace Eneta.Portal.Forum.Common.Controls
{
    public class OWSLabelField : OWSBase
    {
        // Methods
        protected override void Render(HtmlTextWriter wtr)
        {
            wtr.Write("<div class=\"ms-formdescription\" valign=top align=left>");
            if (base.Required)
            {
                wtr.Write("<nobr>{0}<font color=red> *</font></nobr>", this.Text);
            }
            else
            {
                wtr.Write("<nobr>{0}</nobr>", this.Text);
            }
            wtr.Write("</div>");
        }

        // Properties
        public override string Text
        {
            get
            {
                return (this.ViewState["Text"] as string);
            }
            set
            {
                this.ViewState["Text"] = value;
            }
        }
    }

 

}
